<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{border: black solid;}
        #box1{width: 100px;height: 100px;background: yellow;float: left;}
        /*  float ---黄色方块已经浮起来了，不赞用空间，红色和黄色会有重叠 */
        #box2{width: 200px;height: 200px;background: red;float: left;}
    </style>
</head>
<body>
 <div id="box1"></div>   
 <div id="box2"></div>   
</body>
</html>